import 'package:flutter/material.dart';
import 'package:yiyi_app_dome/routes/routes.dart';
import 'package:provider/provider.dart';
import './models/theme.dart';
// import './widget/setting_page.dart'; 

// theme.dart

void main() {
  runApp(
    ChangeNotifierProvider(
      create: (_) => ThemeModel(),
      child: MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Consumer<ThemeModel>(
      builder: (context, themeModel, _) {
        return MaterialApp(
          title: 'Flutter Demo',
          theme: themeModel.currentTheme,
          darkTheme: ThemeData.dark(), 
          initialRoute: '/',
          routes: routes,
        );
      },
    );
  }
}
